Skip to content

Conversation

@Chemaclass
Copy link
Member

@Chemaclass Chemaclass commented Jan 27, 2026

📚 Description

Fixes #582 - The install test was incorrectly using the return value of bashunit::env::active_internet_connection by capturing it with $? after assignment, which doesn't work as expected in bash. This caused network availability to be forced/assumed rather than properly detected.

🔖 Changes

  • Refactored network detection in install_test.sh to use proper if/else conditional instead of relying on $? after function call
  • Now correctly sets ACTIVE_INTERNET to 0 (true) or 1 (false) based on actual network availability

✅ To-do list

  • I updated the CHANGELOG.md to reflect the new feature or fix
  • I updated the documentation to reflect the changes

Wrap active_internet_connection call in an if statement so the
return code is consumed by the conditional rather than causing
the set_up_before_script hook to fail when BASHUNIT_NO_NETWORK=true
or when no network tools are available.

Fixes #582
@Chemaclass Chemaclass added the bug Something isn't working label Jan 27, 2026
@Chemaclass Chemaclass self-assigned this Jan 27, 2026
@Chemaclass Chemaclass merged commit 01fc314 into main Jan 27, 2026
16 checks passed
@Chemaclass Chemaclass deleted the fix/582-network-should-not-be-forced-available branch January 27, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed self-test tests/acceptance/install_test.sh in case no network tools available

3 participants